package com.nuaa.qianru.Health;

import java.util.Arrays;

public class PNNDemo{
	public static void main(String[] args)throws Exception{
		//WindowDemo wd=new WindowDemo();
		DataRead dr=new DataRead();
		double[][] t=dr.getNumber1();
		double[][] p=dr.getNumber2();
		System.out.println(t.length);
		System.out.println(t[0].length);
		int[] classinfo={5,5,5,5,5,5,5,5};
		double smooth=0.01;
		System.out.println("=======Probabilistic Neural Network=======");
		System.out.println("=");
		
		PNN pnn=new PNN(t,classinfo,p,smooth);
		System.out.println("=");
		System.out.println("=");
		System.out.println("=");
		System.out.println("===============End of Program=============");
		System.out.println("=");
		System.out.println("=");
		String[] re=pnn.getClassifier();
		double []gl=pnn.getGailv();
		System.out.println("===Showing previous 5 classifier result===");
		System.out.println(Arrays.toString(re));
		System.out.println(Arrays.toString(gl));
		System.out.println(re.length);
		for (int i=0;i<5;i++){
			System.out.println(re[i]);
			System.out.println(gl[i]);
		}
		System.out.println("=====Showing last 5 classifier result=====");			
		for (int i=0;i<5;i++){
			System.out.println(re[re.length-5+i]);
			System.out.println(gl[gl.length-5+i]);
		}
	}
}
